package com.w.wx.mapper;

import com.w.wx.domain.Liked;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.sql.Timestamp;
import java.util.List;
import java.util.Map;

@Mapper
@Component
public interface LikedMapper {
    int deleteByPrimaryKey(Integer likeId);

    int insert(Liked record);

    Liked selectByPrimaryKey(Integer likeId);


    void updateByKey(Liked liked);
    Liked selectByObjIdAndOpenid(@Param("objId") Integer objId, @Param("userOpenid") String userOpenid,@Param("typej")Integer type);

    int updateByPrimaryKey(@Param("likeId") Integer likeId, @Param("likeStatus") Integer likeStatus, @Param("updateTime") Timestamp updateTime);

    List<Map<String,Object>> selectLikedInfoByType(@Param("typeJ") Integer type);

    //int selectForGetLikedId(@Param("objId") Integer objId, @Param("userOpenid") String userOpenid,@Param("typej")Integer type);

    Integer selectForGetLikedState(@Param("objId") Integer objId, @Param("userOpenid") String userOpenid,@Param("typej")Integer type);
}